package com.leesche.zcsp.node.web.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.leesche.zcsp.node.web.dao.PubDevicePayDetailDao;
import com.leesche.zcsp.node.web.model.PubDevicePayDetail;
import com.leesche.zcsp.node.web.model.PubDevicePayDetailCriteria;
import com.leesche.zcsp.node.web.service.PubDevicePayDetailService;
import com.leesche.zcsp.node.web.service.impl.data.read.PubDevicePayDetailDto;
import com.leesche.zcsp.node.web.service.impl.data.read.QueryPubDevicePayDetailCondition;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @author dennies yang
 * @version V1.0
 * @Title: PubDevicePayDetailServiceImpl.java
 * @Package com.leesche.zcsp.node.service.impl
 * @Description:()
 * @date 2016年9月22日 下午4:22:41
 */
@Service
@Transactional
public class PubDevicePayDetailServiceImpl
        extends
        BaseServiceImpl<PubDevicePayDetail, PubDevicePayDetailCriteria, PubDevicePayDetailDto, QueryPubDevicePayDetailCondition, Long>
        implements PubDevicePayDetailService {
    @Autowired
    private PubDevicePayDetailDao pubDevicePayDetailDao;

    @Autowired
    public void setBaseDao(PubDevicePayDetailDao pubDevicePayDetailDao) {
        super.setBaseDao(pubDevicePayDetailDao);
    }

    @Override
    public List<PubDevicePayDetail> findPayDetailByDeviceidAndUploadTime(QueryPubDevicePayDetailCondition condition) {
        return pubDevicePayDetailDao.selectPayTetailByDeviceidAndUploadTime(condition);
    }

    @Override
    public Integer findPayDetailCount(QueryPubDevicePayDetailCondition condition) {
        return pubDevicePayDetailDao.countPayDetailByCondition(condition);
    }

    @Override
    public int updateByConditionMap(Map map) {
        return pubDevicePayDetailDao.updateByConditionMap(map);
    }
}
